import { _decorator, Component, find, Node } from 'cc';
import { MainLlogic } from './MainLlogic';
const { ccclass, property } = _decorator;

@ccclass('Curtain')
export class Curtain extends Component {
    private mainLogic:Node = null
    start() {
        this.mainLogic = find('Canvas/MainLogic')
        this.node.on(Node.EventType.TOUCH_START,this.touchStart,this)
    }
    touchStart(){
        this.mainLogic.getComponent(MainLlogic).curtainRose()
        this.node.destroy()
    }

    update(deltaTime: number) {
        
    }
}


